package cn.iocoder.an.module.mold.controller.admin.repairaccount.vo;

import cn.iocoder.an.module.mold.dal.dataobject.account.AccountDO;
import cn.iocoder.an.module.mold.dal.dataobject.repairfaultcategory.RepairFaultCategoryDO;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.VO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
import cn.idev.excel.annotation.*;

@Schema(description = "管理后台 - 模具维修申请 Response VO")
@Data
@ExcelIgnoreUnannotated
public class RepairAccountRespVO implements VO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "22839")
    @ExcelProperty("主键")
    private Long id;

    @Schema(description = "单号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("单号")
    private String code;

    @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
    @ExcelProperty("名称")
    private String name;

    @Schema(description = "模具台账", requiredMode = Schema.RequiredMode.REQUIRED, example = "25355")
    @Trans(type = TransType.SIMPLE, target = AccountDO.class, fields = {"name", "code"}, refs = {"accountName","accountCode"})
    private Long accountId;

    @ExcelProperty("模具名称")
    private String accountName;

    @ExcelProperty("模具编码")
    private String accountCode;

    @Schema(description = "故障分类Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "7992")
    @Trans(type = TransType.SIMPLE, target = RepairFaultCategoryDO.class, fields = {"name"}, refs = {"faultName"})
    private Long faultId;

    @ExcelProperty("故障分类名")
    private String faultName;

    @Schema(description = "申请人ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1737")
    @Trans(type = TransType.SIMPLE, targetClassName = "cn.iocoder.an.module.system.dal.dataobject.user.AdminUserDO", fields = "nickname", ref = "applicantName")
    @ExcelProperty("申请人")
    private Long applicantId;

    @ExcelProperty("申请人")
    private String applicantName;

    @Schema(description = "申请部门", requiredMode = Schema.RequiredMode.REQUIRED, example = "19460")
    @Trans(type = TransType.SIMPLE, targetClassName = "cn.iocoder.an.module.system.dal.dataobject.dept.DeptDO", fields = "name", ref = "departName")
    private Long departId;

    @ExcelProperty("申请部门")
    private String departName;

    @Schema(description = "紧急程度", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("紧急程度")
    private Long urgencyLevel;

    @Schema(description = "故障时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("故障时间")
    private LocalDateTime faultTime;

    @Schema(description = "申请时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("申请时间")
    private LocalDateTime applicationTime;

    @Schema(description = "故障描述", example = "你猜")
    @ExcelProperty("故障描述")
    private String faultDescription;

    @Schema(description = "维修方式", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("维修方式")
    private Long repairMethod;

    @Schema(description = "状态", example = "1")
    @ExcelProperty("状态")
    private Integer status;

    @Schema(description = "任务ID", example = "1")
    @ExcelProperty("任务ID")
    private Long jobId;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}
